package com.zzp.thread;

import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class TestCallable implements Callable<Boolean> {

    private String url;
    private String name;

    public TestCallable(String url, String name) {
        this.url = url;
        this.name = name;
    }

    @Override
    public Boolean call() throws Exception {
        return true;
    }

    public static void main(String[] args) {
        TestCallable t1 = new TestCallable("t1", "t1");
        TestCallable t2 = new TestCallable("t2", "t2");
        TestCallable t3 = new TestCallable("t3", "t3");

        ExecutorService ser = Executors.newFixedThreadPool(3);

        ser.submit(t1);
        ser.submit(t2);
        ser.submit(t3);

        ser.shutdown();


    }




}
